package com.yehuishou.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yehuishou.dao.UserDao;
import com.yehuishou.pojo.Address;
import com.yehuishou.pojo.Erwm;
import com.yehuishou.pojo.Identity;
import com.yehuishou.pojo.User;
import com.yehuishou.service.UserService;
@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserDao userDao;
	
	@Override
	public List<User> findBy(String phone, Integer state) {
		
		return userDao.findBy(phone,state);
	}

	@Override
	public List<User> findAll() {
		return userDao.findAll();
	}

	@Override
	public User findById(Integer uid) {
		return userDao.findById(uid);
	}

	@Override
	public Address findAds(Integer uid) {
		return userDao.findAds(uid);
	}

	@Override
	public Identity findIde(Integer uid) {
		return userDao.findIde(uid);
	}

	@Override
	public void updateU(Integer uid, Integer state) {
		userDao.updateU(uid , state);
	}

	@Override
	public void updateI(Integer uid, Integer istate) {
		userDao.updateI(uid , istate);
	}

	@Override
	public List<User> findByW(String phone) {
		return userDao.findByW(phone);
	}

	@Override
	public void del(Integer uid) {
		userDao.del(uid);
		userDao.deli(uid);
	}

	@Override
	public Erwm findErwm(Integer uid) {
		// TODO Auto-generated method stub
		return userDao.findErwm(uid);
	}

}
